<?php
include ("boot.php");

//$oADODB->debug = true;
// ==========================================================================
// Get User's Links
// ==========================================================================

// dao links
$oLink = new daoLinks($oADODB);
$oLink->clean();

// user filter
$oLink->addFilter("iUseID", "=", $_SESSION['iUseID']);
$rsLinks = $oLink->getAll();
// keep it
$rsLinks = $rsLinks->getRows();
// to object	
for ($i=0; $i < count($rsLinks); $i++)
{
	if ($rsLinks[$i]['vLnkName'] != 'My menu')
	{
		$oResponse->$i->iLnkID = $rsLinks[$i]['iLnkID'];
		$oResponse->$i->vLnkName = $rsLinks[$i]['vLnkName'];
		$oResponse->$i->vURL = $rsLinks[$i]['vURL'];
	}

}

// print response
echo json_encode($oResponse);
?>